package net.jiastudy.biz.assessment.entity;

import io.swagger.annotations.ApiModelProperty;
import net.jiastudy.biz.targettask.entity.TargetTask;

public class AssessmentDetailVo {
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "year")
    private Long year;
    @ApiModelProperty(value = "assessment_id")
    private Long assessmentId;
    @ApiModelProperty(value = "assessmented_dept_id")
    private Long assessmentedDeptId;
    @ApiModelProperty(value = "assessment_dept_id")
    private Long assessmentDeptId;
    @ApiModelProperty(value = "top_task_id")
    private Long topTaskId;
    @ApiModelProperty(value = "first_task_id")
    private Long firstTaskId;
    @ApiModelProperty(value = "second_task_id")
    private Long secondTaskId;
    @ApiModelProperty(value = "third_task_id")
    private Long thirdTaskId;
    @ApiModelProperty(value = "weight")
    private Integer weight;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getYear() {
        return year;
    }

    public void setYear(Long year) {
        this.year = year;
    }

    public Long getAssessmentId() {
        return assessmentId;
    }

    public void setAssessmentId(Long assessmentId) {
        this.assessmentId = assessmentId;
    }

    public Long getAssessmentedDeptId() {
        return assessmentedDeptId;
    }

    public void setAssessmentedDeptId(Long assessmentedDeptId) {
        this.assessmentedDeptId = assessmentedDeptId;
    }

    public Long getAssessmentDeptId() {
        return assessmentDeptId;
    }

    public void setAssessmentDeptId(Long assessmentDeptId) {
        this.assessmentDeptId = assessmentDeptId;
    }

    public Long getTopTaskId() {
        return topTaskId;
    }

    public void setTopTaskId(Long topTaskId) {
        this.topTaskId = topTaskId;
    }

    public Long getFirstTaskId() {
        return firstTaskId;
    }

    public void setFirstTaskId(Long firstTaskId) {
        this.firstTaskId = firstTaskId;
    }

    public Long getSecondTaskId() {
        return secondTaskId;
    }

    public void setSecondTaskId(Long secondTaskId) {
        this.secondTaskId = secondTaskId;
    }

    public Long getThirdTaskId() {
        return thirdTaskId;
    }

    public void setThirdTaskId(Long thirdTaskId) {
        this.thirdTaskId = thirdTaskId;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public TargetTask getTargetTask() {
        Long taskId;
        if (null != thirdTaskId) {
            taskId = thirdTaskId;
        } else if (null != secondTaskId) {
            taskId = secondTaskId;
        } else if (null != firstTaskId) {
            taskId = firstTaskId;
        } else {
            taskId = topTaskId;
        }
        TargetTask targetTask = new TargetTask();
        targetTask = targetTask.selectById(taskId);

        return targetTask;
    }
}
